home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-11-30 | 1.6 KB | 74 lines | [TEXT/KAHL] |
- /***********************************************************************************
- CExpanderLabelEnv.h
-
- Copyright © 1994 B-Ray Software. All rights reserved.
- Developed using Symantec C++ 7.0.2 and Symantec's TCL library.
- Portions of this code courtesy Symantec, Inc.
-
- This code may be freely distributed as long as this notice remains. This code
- may not be used in any commercial software without the consent of B-Ray Software.
-
- ---
-
- CExpanderLabelEnv provides a drawing environment for the CExpanderLabel class.
- All we do here is set the TextFace to bold.
-
- ***********************************************************************************/
- #include "CExpanderLabelEnv.h"
-
-
- TCL_DEFINE_CLASS_D1( CExpanderLabelEnv, CEnvironment );
-
- /*
- * CExpanderLabelEnv constructor
- *
- * Default constructor
- */
-
- CExpanderLabelEnv :: CExpanderLabelEnv()
- {
- TCL_END_CONSTRUCTOR
- }
-
-
- /*
- * CExpanderLabel destructor
- *
- * Just a place-holder for Inspector
- */
-
- CExpanderLabelEnv :: ~CExpanderLabelEnv()
- {
- TCL_START_DESTRUCTOR
- }
-
-
- /*
- * Restore method - OVERRIDE
- *
- * Sets up the drawing environment for the label. We save the current
- * setting of the port's text face, and set it bold.
- */
-
- void CExpanderLabelEnv :: Restore( void )
- {
- GrafPtr curPort;
-
- GetPort( &curPort ); // get drawing world
- savedFace = curPort->txFace; // remember current value of text face
- TextFace( bold ); // set text face to bold
- }
-
-
- /*
- * PutBack method - OVERRIDE
- *
- * Restores the drawing environment to how it was before our Restore()
- * method was called. Naming of these methods can be a bit confusing...
- */
-
- void CExpanderLabelEnv :: PutBack( void )
- {
- TextFace( savedFace );
- }
-